@extends('admin.master')

@section('title','管理员列表')

@section('css')
    <!--dynamic table-->
    <link href="{{asset('admin/assets/js/advanced-datatable/css/demo_page.css')}}" rel="stylesheet" />
    <link href="{{asset('admin/assets/js/advanced-datatable/css/demo_table.css" rel="stylesheet')}}" />
    <link rel="stylesheet" href="{{asset('admin/assets/js/data-tables/DT_bootstrap.css')}}" />
@endsection

@section('content')
    <!-- page heading start-->
    <div class="page-heading">
        <h3>
            回收站
        </h3>
        <ul class="breadcrumb">
            <li class="active">
                <a href="{{ url('back/index') }}">后台首页</a>
            </li>
            <li class="active">管理员</li>
        </ul>
    </div>
    <!-- page heading end-->

    <!--body wrapper start-->
    <div class="wrapper">
        @if( session()->get('msg'))
            <div class="alert alert-success alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <strong>恭喜你</strong>{{  session()->get('msg') }}
            </div>
        @endif
        @if(session()->get('error'))
            <div class="alert alert-danger alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <strong>错误</strong>{{ session()->get('error') }}
            </div>
        @endif
        <div class="row">
            <div class="col-sm-12">
                <section class="panel">
                    <header class="panel-heading">
                        管理员
                        <span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
                    </span>
                    </header>
                    <div class="panel-body">
                        <div class="adv-table">
                            <table  class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th class="text-center">分类编号</th>
                                    <th class="text-center">分类名称</th>
                                    <th class="text-center">父类id</th>
                                    <th class="text-center"></th>
                                    <th class="text-center">上次登录时间</th>
                                    <th class="text-center">注册时间</th>
                                    <th class="text-center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($data as $value)
                                    <tr>
                                        <td class="text-center">{{ $value->id}}</td>
                                        <td class="text-center">{{ $value->title}}</td>
                                        <td class="text-center">{{ $value->parentid}}</td>
                                        <td class="text-center">{{ $value->path}}</td>
                                        <td class="text-center">{{ $value->updated_at}}</td>
                                        <td class="text-center">{{ $value->created_at}}</td>
                                        <td class="text-center">
                                            <a href="recover/{{ $value->id}}"><i class="fa fa-pencil"></i>恢复</a>
                                            <a href="{{ url('back/recycle/delete/'. $value->id )}}"><i class="fa fa-times"></i>删除</a>
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                        <div class="row-fluid">
                            <div class="dataTables_paginate paging_bootstrap pagination">{!! $data->appends($request)->render() !!}</div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </div>
    <!--body wrapper end-->
    <!--footer section start-->
    <footer>
        2014 &copy; AdminEx by <a href="http://www.aspku.com/" target="_blank">源码之家</a>
    </footer>
    <!--footer section end-->
@endsection

@section('js')
    <!--dynamic table-->
    <script type="text/javascript" language="javascript" src="{{asset('admin/assets/js/advanced-datatable/js/jquery.dataTables.js')}}"></script>
    <script type="text/javascript" src="{{asset('admin/assets/js/data-tables/DT_bootstrap.js')}}"></script>
    <!--dynamic table initialization -->
    <script src="{{asset('admin/assets/js/dynamic_table_init.js')}}"></script>
@endsection